<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>

    <div id="root">
        <h1>插值语法</h1>
        Hello,{{name}},{{address}}！
        <hr>
        <h1>指令语法</h1>
        <a v-bind:href="url" v-bind:x="hello">点我去百度</a>
        <a :href="url" :x="Date.now()">点我去百度</a>
    </div>

    <script>
        Vue.config.productionTip = false

        const x = new Vue({
            el:'#root',   //用于指定当前vue实例用于哪个容器，值通常为 css选择器字符串
            data:{
                name:'魔法师',
                address:'宁波',
                url:'http://www.baidu.com',
                hello:'你好'
            }
        })
    </script>
</body>
</html>